package com.dhl.command.light;

import com.dhl.command.Command;

/**
 * @title: Light
 * @Author danghailiang
 * @Date: 2022/8/20 12:01
 * @Version 1.0
 */
public class LightOffCommand implements Command {

    private LightReceiver lightReceiver;

    public LightOffCommand ( LightReceiver lightReceiver ){
        super();
        this.lightReceiver = lightReceiver;
    }

    @Override
    public void execute(  ) {
        lightReceiver.off();
    }

    @Override
    public void undo() {
        lightReceiver.on();
    }
}
